home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / gcc.info-28 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  45.2 KB  |  1,018 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * gcc: (gcc).                  The GNU Compiler Collection.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU compiler.
  9.  
  10.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  11. Boston, MA 02111-1307 USA
  12.  
  13.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  14. 1999, 2000 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License" and "Funding
  23. for Free Software" are included exactly as in the original, and
  24. provided that the entire resulting derived work is distributed under
  25. the terms of a permission notice identical to this one.
  26.  
  27.    Permission is granted to copy and distribute translations of this
  28. manual into another language, under the above conditions for modified
  29. versions, except that the sections entitled "GNU General Public
  30. License" and "Funding for Free Software", and this permission notice,
  31. may be included in translations approved by the Free Software Foundation
  32. instead of in the original English.
  33.  
  34. 
  35. File: gcc.info,  Node: Misc,  Prev: Cross-compilation,  Up: Target Macros
  36.  
  37. Miscellaneous Parameters
  38. ========================
  39.  
  40.    Here are several miscellaneous parameters.
  41.  
  42. `PREDICATE_CODES'
  43.      Define this if you have defined special-purpose predicates in the
  44.      file `MACHINE.c'.  This macro is called within an initializer of an
  45.      array of structures.  The first field in the structure is the name
  46.      of a predicate and the second field is an array of rtl codes.  For
  47.      each predicate, list all rtl codes that can be in expressions
  48.      matched by the predicate.  The list should have a trailing comma.
  49.      Here is an example of two entries in the list for a typical RISC
  50.      machine:
  51.  
  52.           #define PREDICATE_CODES \
  53.             {"gen_reg_rtx_operand", {SUBREG, REG}},  \
  54.             {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},
  55.  
  56.      Defining this macro does not affect the generated code (however,
  57.      incorrect definitions that omit an rtl code that may be matched by
  58.      the predicate can cause the compiler to malfunction).  Instead, it
  59.      allows the table built by `genrecog' to be more compact and
  60.      efficient, thus speeding up the compiler.  The most important
  61.      predicates to include in the list specified by this macro are
  62.      those used in the most insn patterns.
  63.  
  64. `CASE_VECTOR_MODE'
  65.      An alias for a machine mode name.  This is the machine mode that
  66.      elements of a jump-table should have.
  67.  
  68. `CASE_VECTOR_SHORTEN_MODE (MIN_OFFSET, MAX_OFFSET, BODY)'
  69.      Optional: return the preferred mode for an `addr_diff_vec' when
  70.      the minimum and maximum offset are known.  If you define this, it
  71.      enables extra code in branch shortening to deal with
  72.      `addr_diff_vec'.  To make this work, you also have to define
  73.      INSN_ALIGN and make the alignment for `addr_diff_vec' explicit.
  74.      The BODY argument is provided so that the offset_unsigned and scale
  75.      flags can be updated.
  76.  
  77. `CASE_VECTOR_PC_RELATIVE'
  78.      Define this macro to be a C expression to indicate when jump-tables
  79.      should contain relative addresses.  If jump-tables never contain
  80.      relative addresses, then you need not define this macro.
  81.  
  82. `CASE_DROPS_THROUGH'
  83.      Define this if control falls through a `case' insn when the index
  84.      value is out of range.  This means the specified default-label is
  85.      actually ignored by the `case' insn proper.
  86.  
  87. `CASE_VALUES_THRESHOLD'
  88.      Define this to be the smallest number of different values for
  89.      which it is best to use a jump-table instead of a tree of
  90.      conditional branches.  The default is four for machines with a
  91.      `casesi' instruction and five otherwise.  This is best for most
  92.      machines.
  93.  
  94. `WORD_REGISTER_OPERATIONS'
  95.      Define this macro if operations between registers with integral
  96.      mode smaller than a word are always performed on the entire
  97.      register.  Most RISC machines have this property and most CISC
  98.      machines do not.
  99.  
  100. `LOAD_EXTEND_OP (MODE)'
  101.      Define this macro to be a C expression indicating when insns that
  102.      read memory in MODE, an integral mode narrower than a word, set the
  103.      bits outside of MODE to be either the sign-extension or the
  104.      zero-extension of the data read.  Return `SIGN_EXTEND' for values
  105.      of MODE for which the insn sign-extends, `ZERO_EXTEND' for which
  106.      it zero-extends, and `NIL' for other modes.
  107.  
  108.      This macro is not called with MODE non-integral or with a width
  109.      greater than or equal to `BITS_PER_WORD', so you may return any
  110.      value in this case.  Do not define this macro if it would always
  111.      return `NIL'.  On machines where this macro is defined, you will
  112.      normally define it as the constant `SIGN_EXTEND' or `ZERO_EXTEND'.
  113.  
  114. `SHORT_IMMEDIATES_SIGN_EXTEND'
  115.      Define this macro if loading short immediate values into registers
  116.      sign extends.
  117.  
  118. `IMPLICIT_FIX_EXPR'
  119.      An alias for a tree code that should be used by default for
  120.      conversion of floating point values to fixed point.  Normally,
  121.      `FIX_ROUND_EXPR' is used.
  122.  
  123. `FIXUNS_TRUNC_LIKE_FIX_TRUNC'
  124.      Define this macro if the same instructions that convert a floating
  125.      point number to a signed fixed point number also convert validly
  126.      to an unsigned one.
  127.  
  128. `EASY_DIV_EXPR'
  129.      An alias for a tree code that is the easiest kind of division to
  130.      compile code for in the general case.  It may be `TRUNC_DIV_EXPR',
  131.      `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four
  132.      division operators differ in how they round the result to an
  133.      integer.  `EASY_DIV_EXPR' is used when it is permissible to use
  134.      any of those kinds of division and the choice should be made on
  135.      the basis of efficiency.
  136.  
  137. `MOVE_MAX'
  138.      The maximum number of bytes that a single instruction can move
  139.      quickly between memory and registers or between two memory
  140.      locations.
  141.  
  142. `MAX_MOVE_MAX'
  143.      The maximum number of bytes that a single instruction can move
  144.      quickly between memory and registers or between two memory
  145.      locations.  If this is undefined, the default is `MOVE_MAX'.
  146.      Otherwise, it is the constant value that is the largest value that
  147.      `MOVE_MAX' can have at run-time.
  148.  
  149. `SHIFT_COUNT_TRUNCATED'
  150.      A C expression that is nonzero if on this machine the number of
  151.      bits actually used for the count of a shift operation is equal to
  152.      the number of bits needed to represent the size of the object
  153.      being shifted.  When this macro is non-zero, the compiler will
  154.      assume that it is safe to omit a sign-extend, zero-extend, and
  155.      certain bitwise `and' instructions that truncates the count of a
  156.      shift operation.  On machines that have instructions that act on
  157.      bitfields at variable positions, which may include `bit test'
  158.      instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables
  159.      deletion of truncations of the values that serve as arguments to
  160.      bitfield instructions.
  161.  
  162.      If both types of instructions truncate the count (for shifts) and
  163.      position (for bitfield operations), or if no variable-position
  164.      bitfield instructions exist, you should define this macro.
  165.  
  166.      However, on some machines, such as the 80386 and the 680x0,
  167.      truncation only applies to shift operations and not the (real or
  168.      pretended) bitfield operations.  Define `SHIFT_COUNT_TRUNCATED' to
  169.      be zero on such machines.  Instead, add patterns to the `md' file
  170.      that include the implied truncation of the shift instructions.
  171.  
  172.      You need not define this macro if it would always have the value
  173.      of zero.
  174.  
  175. `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)'
  176.      A C expression which is nonzero if on this machine it is safe to
  177.      "convert" an integer of INPREC bits to one of OUTPREC bits (where
  178.      OUTPREC is smaller than INPREC) by merely operating on it as if it
  179.      had only OUTPREC bits.
  180.  
  181.      On many machines, this expression can be 1.
  182.  
  183.      When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for
  184.      modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result.
  185.      If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in
  186.      such cases may improve things.
  187.  
  188. `STORE_FLAG_VALUE'
  189.      A C expression describing the value returned by a comparison
  190.      operator with an integral mode and stored by a store-flag
  191.      instruction (`sCOND') when the condition is true.  This
  192.      description must apply to *all* the `sCOND' patterns and all the
  193.      comparison operators whose results have a `MODE_INT' mode.
  194.  
  195.      A value of 1 or -1 means that the instruction implementing the
  196.      comparison operator returns exactly 1 or -1 when the comparison is
  197.      true and 0 when the comparison is false.  Otherwise, the value
  198.      indicates which bits of the result are guaranteed to be 1 when the
  199.      comparison is true.  This value is interpreted in the mode of the
  200.      comparison operation, which is given by the mode of the first
  201.      operand in the `sCOND' pattern.  Either the low bit or the sign
  202.      bit of `STORE_FLAG_VALUE' be on.  Presently, only those bits are
  203.      used by the compiler.
  204.  
  205.      If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will
  206.      generate code that depends only on the specified bits.  It can also
  207.      replace comparison operators with equivalent operations if they
  208.      cause the required bits to be set, even if the remaining bits are
  209.      undefined.  For example, on a machine whose comparison operators
  210.      return an `SImode' value and where `STORE_FLAG_VALUE' is defined as
  211.      `0x80000000', saying that just the sign bit is relevant, the
  212.      expression
  213.  
  214.           (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))
  215.  
  216.      can be converted to
  217.  
  218.           (ashift:SI X (const_int N))
  219.  
  220.      where N is the appropriate shift count to move the bit being
  221.      tested into the sign bit.
  222.  
  223.      There is no way to describe a machine that always sets the
  224.      low-order bit for a true value, but does not guarantee the value
  225.      of any other bits, but we do not know of any machine that has such
  226.      an instruction.  If you are trying to port GNU CC to such a
  227.      machine, include an instruction to perform a logical-and of the
  228.      result with 1 in the pattern for the comparison operators and let
  229.      us know (*note How to Report Bugs: Bug Reporting.).
  230.  
  231.      Often, a machine will have multiple instructions that obtain a
  232.      value from a comparison (or the condition codes).  Here are rules
  233.      to guide the choice of value for `STORE_FLAG_VALUE', and hence the
  234.      instructions to be used:
  235.  
  236.         * Use the shortest sequence that yields a valid definition for
  237.           `STORE_FLAG_VALUE'.  It is more efficient for the compiler to
  238.           "normalize" the value (convert it to, e.g., 1 or 0) than for
  239.           the comparison operators to do so because there may be
  240.           opportunities to combine the normalization with other
  241.           operations.
  242.  
  243.         * For equal-length sequences, use a value of 1 or -1, with -1
  244.           being slightly preferred on machines with expensive jumps and
  245.           1 preferred on other machines.
  246.  
  247.         * As a second choice, choose a value of `0x80000001' if
  248.           instructions exist that set both the sign and low-order bits
  249.           but do not define the others.
  250.  
  251.         * Otherwise, use a value of `0x80000000'.
  252.  
  253.      Many machines can produce both the value chosen for
  254.      `STORE_FLAG_VALUE' and its negation in the same number of
  255.      instructions.  On those machines, you should also define a pattern
  256.      for those cases, e.g., one matching
  257.  
  258.           (set A (neg:M (ne:M B C)))
  259.  
  260.      Some machines can also perform `and' or `plus' operations on
  261.      condition code values with less instructions than the corresponding
  262.      `sCOND' insn followed by `and' or `plus'.  On those machines,
  263.      define the appropriate patterns.  Use the names `incscc' and
  264.      `decscc', respectively, for the patterns which perform `plus' or
  265.      `minus' operations on condition code values.  See `rs6000.md' for
  266.      some examples.  The GNU Superoptizer can be used to find such
  267.      instruction sequences on other machines.
  268.  
  269.      You need not define `STORE_FLAG_VALUE' if the machine has no
  270.      store-flag instructions.
  271.  
  272. `FLOAT_STORE_FLAG_VALUE'
  273.      A C expression that gives a non-zero floating point value that is
  274.      returned when comparison operators with floating-point results are
  275.      true.  Define this macro on machine that have comparison
  276.      operations that return floating-point values.  If there are no
  277.      such operations, do not define this macro.
  278.  
  279. `Pmode'
  280.      An alias for the machine mode for pointers.  On most machines,
  281.      define this to be the integer mode corresponding to the width of a
  282.      hardware pointer; `SImode' on 32-bit machine or `DImode' on 64-bit
  283.      machines.  On some machines you must define this to be one of the
  284.      partial integer modes, such as `PSImode'.
  285.  
  286.      The width of `Pmode' must be at least as large as the value of
  287.      `POINTER_SIZE'.  If it is not equal, you must define the macro
  288.      `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to
  289.      `Pmode'.
  290.  
  291. `FUNCTION_MODE'
  292.      An alias for the machine mode used for memory references to
  293.      functions being called, in `call' RTL expressions.  On most
  294.      machines this should be `QImode'.
  295.  
  296. `INTEGRATE_THRESHOLD (DECL)'
  297.      A C expression for the maximum number of instructions above which
  298.      the function DECL should not be inlined.  DECL is a
  299.      `FUNCTION_DECL' node.
  300.  
  301.      The default definition of this macro is 64 plus 8 times the number
  302.      of arguments that the function accepts.  Some people think a larger
  303.      threshold should be used on RISC machines.
  304.  
  305. `SCCS_DIRECTIVE'
  306.      Define this if the preprocessor should ignore `#sccs' directives
  307.      and print no error message.
  308.  
  309. `NO_IMPLICIT_EXTERN_C'
  310.      Define this macro if the system header files support C++ as well
  311.      as C.  This macro inhibits the usual method of using system header
  312.      files in C++, which is to pretend that the file's contents are
  313.      enclosed in `extern "C" {...}'.
  314.  
  315. `HANDLE_PRAGMA (GETC, UNGETC, NAME)'
  316.      Define this macro if you want to implement any pragmas.  If
  317.      defined, it is a C expression whose value is 1 if the pragma was
  318.      handled by the macro, zero otherwise.  The argument GETC is a
  319.      function of type `int (*)(void)' which will return the next
  320.      character in the input stream, or EOF if no characters are left.
  321.      The argument UNGETC is a function of type `void (*)(int)' which
  322.      will push a character back into the input stream.  The argument
  323.      NAME is the word following #pragma in the input stream.  The input
  324.      stream pointer will be pointing just beyond the end of this word.
  325.      The input stream should be left undistrubed if the expression
  326.      returns zero, otherwise it should be pointing at the next
  327.      character after the end of the pragma.  Any characters remaining
  328.      on the line will be ignored.
  329.  
  330.      It is generally a bad idea to implement new uses of `#pragma'.  The
  331.      only reason to define this macro is for compatibility with other
  332.      compilers that do support `#pragma' for the sake of any user
  333.      programs which already use it.
  334.  
  335.      If the pragma can be implemented by atttributes then the macro
  336.      `INSERT_ATTRIBUTES' might be a useful one to define as well.
  337.  
  338.      Note: older versions of this macro only had two arguments: STREAM
  339.      and TOKEN.  The macro was changed in order to allow it to work
  340.      when gcc is built both with and without a cpp library.
  341.  
  342. `HANDLE_SYSV_PRAGMA'
  343.      Define this macro (to a value of 1) if you want the System V style
  344.      pragmas `#pragma pack(<n>)' and `#pragma weak <name> [=<value>]'
  345.      to be supported by gcc.
  346.  
  347.      The pack pragma specifies the maximum alignment (in bytes) of
  348.      fields within a structure, in much the same way as the
  349.      `__aligned__' and `__packed__' `__attribute__'s do.  A pack value
  350.      of zero resets the behaviour to the default.
  351.  
  352.      The weak pragma only works if `SUPPORTS_WEAK' and
  353.      `ASM_WEAKEN_LABEL' are defined.  If enabled it allows the creation
  354.      of specifically named weak labels, optionally with a value.
  355.  
  356. `HANDLE_PRAGMA_PACK_PUSH_POP'
  357.      Define this macro (to a value of 1) if you want to support the
  358.      Win32 style pragmas `#pragma pack(push,<n>)' and `#pragma
  359.      pack(pop)'.  The pack(push,<n>) pragma specifies the maximum
  360.      alignment (in bytes) of fields within a structure, in much the
  361.      same way as the `__aligned__' and `__packed__' `__attribute__'s
  362.      do.  A pack value of zero resets the behaviour to the default.
  363.      Successive invocations of this pragma cause the previous values to
  364.      be stacked, so that invocations of `#pragma pack(pop)' will return
  365.      to the previous value.
  366.  
  367. `VALID_MACHINE_DECL_ATTRIBUTE (DECL, ATTRIBUTES, IDENTIFIER, ARGS)'
  368.      If defined, a C expression whose value is nonzero if IDENTIFIER
  369.      with arguments ARGS is a valid machine specific attribute for DECL.
  370.      The attributes in ATTRIBUTES have previously been assigned to DECL.
  371.  
  372. `VALID_MACHINE_TYPE_ATTRIBUTE (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)'
  373.      If defined, a C expression whose value is nonzero if IDENTIFIER
  374.      with arguments ARGS is a valid machine specific attribute for TYPE.
  375.      The attributes in ATTRIBUTES have previously been assigned to TYPE.
  376.  
  377. `COMP_TYPE_ATTRIBUTES (TYPE1, TYPE2)'
  378.      If defined, a C expression whose value is zero if the attributes on
  379.      TYPE1 and TYPE2 are incompatible, one if they are compatible, and
  380.      two if they are nearly compatible (which causes a warning to be
  381.      generated).
  382.  
  383. `SET_DEFAULT_TYPE_ATTRIBUTES (TYPE)'
  384.      If defined, a C statement that assigns default attributes to newly
  385.      defined TYPE.
  386.  
  387. `MERGE_MACHINE_TYPE_ATTRIBUTES (TYPE1, TYPE2)'
  388.      Define this macro if the merging of type attributes needs special
  389.      handling.  If defined, the result is a list of the combined
  390.      TYPE_ATTRIBUTES of TYPE1 and TYPE2.  It is assumed that comptypes
  391.      has already been called and returned 1.
  392.  
  393. `MERGE_MACHINE_DECL_ATTRIBUTES (OLDDECL, NEWDECL)'
  394.      Define this macro if the merging of decl attributes needs special
  395.      handling.  If defined, the result is a list of the combined
  396.      DECL_MACHINE_ATTRIBUTES of OLDDECL and NEWDECL.  NEWDECL is a
  397.      duplicate declaration of OLDDECL.  Examples of when this is needed
  398.      are when one attribute overrides another, or when an attribute is
  399.      nullified by a subsequent definition.
  400.  
  401. `INSERT_ATTRIBUTES (NODE, ATTR_PTR, PREFIX_PTR)'
  402.      Define this macro if you want to be able to add attributes to a
  403.      decl when it is being created.  This is normally useful for
  404.      backends which wish to implement a pragma by using the attributes
  405.      which correspond to the pragma's effect.  The NODE argument is the
  406.      decl which is being created.  The ATTR_PTR argument is a pointer
  407.      to the attribute list for this decl.  The PREFIX_PTR is a pointer
  408.      to the list of attributes that have appeared after the specifiers
  409.      and modifiers of the declaration, but before the declaration
  410.      proper.
  411.  
  412. `SET_DEFAULT_DECL_ATTRIBUTES (DECL, ATTRIBUTES)'
  413.      If defined, a C statement that assigns default attributes to newly
  414.      defined DECL.
  415.  
  416. `DOLLARS_IN_IDENTIFIERS'
  417.      Define this macro to control use of the character `$' in identifier
  418.      names.  0 means `$' is not allowed by default; 1 means it is
  419.      allowed.  1 is the default; there is no need to define this macro
  420.      in that case.  This macro controls the compiler proper; it does
  421.      not affect the preprocessor.
  422.  
  423. `NO_DOLLAR_IN_LABEL'
  424.      Define this macro if the assembler does not accept the character
  425.      `$' in label names.  By default constructors and destructors in
  426.      G++ have `$' in the identifiers.  If this macro is defined, `.' is
  427.      used instead.
  428.  
  429. `NO_DOT_IN_LABEL'
  430.      Define this macro if the assembler does not accept the character
  431.      `.' in label names.  By default constructors and destructors in G++
  432.      have names that use `.'.  If this macro is defined, these names
  433.      are rewritten to avoid `.'.
  434.  
  435. `DEFAULT_MAIN_RETURN'
  436.      Define this macro if the target system expects every program's
  437.      `main' function to return a standard "success" value by default
  438.      (if no other value is explicitly returned).
  439.  
  440.      The definition should be a C statement (sans semicolon) to
  441.      generate the appropriate rtl instructions.  It is used only when
  442.      compiling the end of `main'.
  443.  
  444. `HAVE_ATEXIT'
  445.      Define this if the target system supports the function `atexit'
  446.      from the ANSI C standard.  If this is not defined, and
  447.      `INIT_SECTION_ASM_OP' is not defined, a default `exit' function
  448.      will be provided to support C++.
  449.  
  450. `EXIT_BODY'
  451.      Define this if your `exit' function needs to do something besides
  452.      calling an external function `_cleanup' before terminating with
  453.      `_exit'.  The `EXIT_BODY' macro is only needed if neither
  454.      `HAVE_ATEXIT' nor `INIT_SECTION_ASM_OP' are defined.
  455.  
  456. `INSN_SETS_ARE_DELAYED (INSN)'
  457.      Define this macro as a C expression that is nonzero if it is safe
  458.      for the delay slot scheduler to place instructions in the delay
  459.      slot of INSN, even if they appear to use a resource set or
  460.      clobbered in INSN.  INSN is always a `jump_insn' or an `insn'; GNU
  461.      CC knows that every `call_insn' has this behavior.  On machines
  462.      where some `insn' or `jump_insn' is really a function call and
  463.      hence has this behavior, you should define this macro.
  464.  
  465.      You need not define this macro if it would always return zero.
  466.  
  467. `INSN_REFERENCES_ARE_DELAYED (INSN)'
  468.      Define this macro as a C expression that is nonzero if it is safe
  469.      for the delay slot scheduler to place instructions in the delay
  470.      slot of INSN, even if they appear to set or clobber a resource
  471.      referenced in INSN.  INSN is always a `jump_insn' or an `insn'.
  472.      On machines where some `insn' or `jump_insn' is really a function
  473.      call and its operands are registers whose use is actually in the
  474.      subroutine it calls, you should define this macro.  Doing so
  475.      allows the delay slot scheduler to move instructions which copy
  476.      arguments into the argument registers into the delay slot of INSN.
  477.  
  478.      You need not define this macro if it would always return zero.
  479.  
  480. `MACHINE_DEPENDENT_REORG (INSN)'
  481.      In rare cases, correct code generation requires extra machine
  482.      dependent processing between the second jump optimization pass and
  483.      delayed branch scheduling.  On those machines, define this macro
  484.      as a C statement to act on the code starting at INSN.
  485.  
  486. `MULTIPLE_SYMBOL_SPACES'
  487.      Define this macro if in some cases global symbols from one
  488.      translation unit may not be bound to undefined symbols in another
  489.      translation unit without user intervention.  For instance, under
  490.      Microsoft Windows symbols must be explicitly imported from shared
  491.      libraries (DLLs).
  492.  
  493. `ISSUE_RATE'
  494.      A C expression that returns how many instructions can be issued at
  495.      the same time if the machine is a superscalar machine.  This is
  496.      only used by the `Haifa' scheduler, and not the traditional
  497.      scheduler.
  498.  
  499. `MD_SCHED_INIT (FILE, VERBOSE)'
  500.      A C statement which is executed by the `Haifa' scheduler at the
  501.      beginning of each block of instructions that are to be scheduled.
  502.      FILE is either a null pointer, or a stdio stream to write any
  503.      debug output to.  VERBOSE is the verbose level provided by
  504.      `-fsched-verbose-'N.
  505.  
  506. `MD_SCHED_REORDER (FILE, VERBOSE, READY, N_READY)'
  507.      A C statement which is executed by the `Haifa' scheduler after it
  508.      has scheduled the ready list to allow the machine description to
  509.      reorder it (for example to combine two small instructions together
  510.      on `VLIW' machines).  FILE is either a null pointer, or a stdio
  511.      stream to write any debug output to.  VERBOSE is the verbose level
  512.      provided by `-fsched-verbose-'N.  READY is a pointer to the ready
  513.      list of instructions that are ready to be scheduled.  N_READY is
  514.      the number of elements in the ready list.  The scheduler reads the
  515.      ready list in reverse order, starting with READY[N_READY-1] and
  516.      going to READY[0].
  517.  
  518. `MD_SCHED_VARIABLE_ISSUE (FILE, VERBOSE, INSN, MORE)'
  519.      A C statement which is executed by the `Haifa' scheduler after it
  520.      has scheduled an insn from the ready list.  FILE is either a null
  521.      pointer, or a stdio stream to write any debug output to.  VERBOSE
  522.      is the verbose level provided by `-fsched-verbose-'N.  INSN is the
  523.      instruction that was scheduled.  MORE is the number of
  524.      instructions that can be issued in the current cycle.  The
  525.      `MD_SCHED_VARIABLE_ISSUE' macro is responsible for updating the
  526.      value of MORE (typically by MORE-).
  527.  
  528. `MAX_INTEGER_COMPUTATION_MODE'
  529.      Define this to the largest integer machine mode which can be used
  530.      for operations other than load, store and copy operations.
  531.  
  532.      You need only define this macro if the target holds values larger
  533.      than `word_mode' in general purpose registers.  Most targets
  534.      should not define this macro.
  535.  
  536. `MATH_LIBRARY'
  537.      Define this macro as a C string constant for the linker argument
  538.      to link in the system math library, or `""' if the target does not
  539.      have a separate math library.
  540.  
  541.      You need only define this macro if the default of `"-lm"' is wrong.
  542.  
  543. 
  544. File: gcc.info,  Node: Config,  Next: Fragments,  Prev: Target Macros,  Up: Top
  545.  
  546. The Configuration File
  547. **********************
  548.  
  549.    The configuration file `xm-MACHINE.h' contains macro definitions
  550. that describe the machine and system on which the compiler is running,
  551. unlike the definitions in `MACHINE.h', which describe the machine for
  552. which the compiler is producing output.  Most of the values in
  553. `xm-MACHINE.h' are actually the same on all machines that GCC runs on,
  554. so large parts of all configuration files are identical.  But there are
  555. some macros that vary:
  556.  
  557. `USG'
  558.      Define this macro if the host system is System V.
  559.  
  560. `VMS'
  561.      Define this macro if the host system is VMS.
  562.  
  563. `FATAL_EXIT_CODE'
  564.      A C expression for the status code to be returned when the compiler
  565.      exits after serious errors.
  566.  
  567. `SUCCESS_EXIT_CODE'
  568.      A C expression for the status code to be returned when the compiler
  569.      exits without serious errors.
  570.  
  571. `HOST_WORDS_BIG_ENDIAN'
  572.      Defined if the host machine stores words of multi-word values in
  573.      big-endian order.  (GCC does not depend on the host byte ordering
  574.      within a word.)
  575.  
  576. `HOST_FLOAT_WORDS_BIG_ENDIAN'
  577.      Define this macro to be 1 if the host machine stores `DFmode',
  578.      `XFmode' or `TFmode' floating point numbers in memory with the
  579.      word containing the sign bit at the lowest address; otherwise,
  580.      define it to be zero.
  581.  
  582.      This macro need not be defined if the ordering is the same as for
  583.      multi-word integers.
  584.  
  585. `HOST_FLOAT_FORMAT'
  586.      A numeric code distinguishing the floating point format for the
  587.      host machine.  See `TARGET_FLOAT_FORMAT' in *Note Storage
  588.      Layout::. for the alternatives and default.
  589.  
  590. `HOST_BITS_PER_CHAR'
  591.      A C expression for the number of bits in `char' on the host
  592.      machine.
  593.  
  594. `HOST_BITS_PER_SHORT'
  595.      A C expression for the number of bits in `short' on the host
  596.      machine.
  597.  
  598. `HOST_BITS_PER_INT'
  599.      A C expression for the number of bits in `int' on the host machine.
  600.  
  601. `HOST_BITS_PER_LONG'
  602.      A C expression for the number of bits in `long' on the host
  603.      machine.
  604.  
  605. `ONLY_INT_FIELDS'
  606.      Define this macro to indicate that the host compiler only supports
  607.      `int' bit fields, rather than other integral types, including
  608.      `enum', as do most C compilers.
  609.  
  610. `OBSTACK_CHUNK_SIZE'
  611.      A C expression for the size of ordinary obstack chunks.  If you
  612.      don't define this, a usually-reasonable default is used.
  613.  
  614. `OBSTACK_CHUNK_ALLOC'
  615.      The function used to allocate obstack chunks.  If you don't define
  616.      this, `xmalloc' is used.
  617.  
  618. `OBSTACK_CHUNK_FREE'
  619.      The function used to free obstack chunks.  If you don't define
  620.      this, `free' is used.
  621.  
  622. `USE_C_ALLOCA'
  623.      Define this macro to indicate that the compiler is running with the
  624.      `alloca' implemented in C.  This version of `alloca' can be found
  625.      in the file `alloca.c'; to use it, you must also alter the
  626.      `Makefile' variable `ALLOCA'.  (This is done automatically for the
  627.      systems on which we know it is needed.)
  628.  
  629.      If you do define this macro, you should probably do it as follows:
  630.  
  631.           #ifndef __GNUC__
  632.           #define USE_C_ALLOCA
  633.           #else
  634.           #define alloca __builtin_alloca
  635.           #endif
  636.  
  637.      so that when the compiler is compiled with GCC it uses the more
  638.      efficient built-in `alloca' function.
  639.  
  640. `FUNCTION_CONVERSION_BUG'
  641.      Define this macro to indicate that the host compiler does not
  642.      properly handle converting a function value to a
  643.      pointer-to-function when it is used in an expression.
  644.  
  645. `MULTIBYTE_CHARS'
  646.      Define this macro to enable support for multibyte characters in the
  647.      input to GCC.  This requires that the host system support the ANSI
  648.      C library functions for converting multibyte characters to wide
  649.      characters.
  650.  
  651. `POSIX'
  652.      Define this if your system is POSIX.1 compliant.
  653.  
  654. `NO_SYS_SIGLIST'
  655.      Define this if your system *does not* provide the variable
  656.      `sys_siglist'.
  657.  
  658.      Some systems do provide this variable, but with a different name
  659.      such as `_sys_siglist'.  On these systems, you can define
  660.      `sys_siglist' as a macro which expands into the name actually
  661.      provided.
  662.  
  663.      Autoconf normally defines `SYS_SIGLIST_DECLARED' when it finds a
  664.      declaration of `sys_siglist' in the system header files.  However,
  665.      when you define `sys_siglist' to a different name autoconf will
  666.      not automatically define `SYS_SIGLIST_DECLARED'.  Therefore, if
  667.      you define `sys_siglist', you should also define
  668.      `SYS_SIGLIST_DECLARED'.
  669.  
  670. `USE_PROTOTYPES'
  671.      Define this to be 1 if you know that the host compiler supports
  672.      prototypes, even if it doesn't define __STDC__, or define it to be
  673.      0 if you do not want any prototypes used in compiling GCC.  If
  674.      `USE_PROTOTYPES' is not defined, it will be determined
  675.      automatically whether your compiler supports prototypes by
  676.      checking if `__STDC__' is defined.
  677.  
  678. `NO_MD_PROTOTYPES'
  679.      Define this if you wish suppression of prototypes generated from
  680.      the machine description file, but to use other prototypes within
  681.      GCC.  If `USE_PROTOTYPES' is defined to be 0, or the host compiler
  682.      does not support prototypes, this macro has no effect.
  683.  
  684. `MD_CALL_PROTOTYPES'
  685.      Define this if you wish to generate prototypes for the `gen_call'
  686.      or `gen_call_value' functions generated from the machine
  687.      description file.  If `USE_PROTOTYPES' is defined to be 0, or the
  688.      host compiler does not support prototypes, or `NO_MD_PROTOTYPES'
  689.      is defined, this macro has no effect.  As soon as all of the
  690.      machine descriptions are modified to have the appropriate number
  691.      of arguments, this macro will be removed.
  692.  
  693. `PATH_SEPARATOR'
  694.      Define this macro to be a C character constant representing the
  695.      character used to separate components in paths.  The default value
  696.      is the colon character
  697.  
  698. `DIR_SEPARATOR'
  699.      If your system uses some character other than slash to separate
  700.      directory names within a file specification, define this macro to
  701.      be a C character constant specifying that character.  When GCC
  702.      displays file names, the character you specify will be used.  GCC
  703.      will test for both slash and the character you specify when
  704.      parsing filenames.
  705.  
  706. `OBJECT_SUFFIX'
  707.      Define this macro to be a C string representing the suffix for
  708.      object files on your machine.  If you do not define this macro,
  709.      GCC will use `.o' as the suffix for object files.
  710.  
  711. `EXECUTABLE_SUFFIX'
  712.      Define this macro to be a C string representing the suffix for
  713.      executable files on your machine.  If you do not define this
  714.      macro, GCC will use the null string as the suffix for object files.
  715.  
  716. `COLLECT_EXPORT_LIST'
  717.      If defined, `collect2' will scan the individual object files
  718.      specified on its command line and create an export list for the
  719.      linker.  Define this macro for systems like AIX, where the linker
  720.      discards object files that are not referenced from `main' and uses
  721.      export lists.
  722.  
  723.    In addition, configuration files for system V define `bcopy',
  724. `bzero' and `bcmp' as aliases.  Some files define `alloca' as a macro
  725. when compiled with GCC, in order to take advantage of the benefit of
  726. GCC's built-in `alloca'.
  727.  
  728. 
  729. File: gcc.info,  Node: Fragments,  Next: Funding,  Prev: Config,  Up: Top
  730.  
  731. Makefile Fragments
  732. ******************
  733.  
  734.    When you configure GCC using the `configure' script (*note
  735. Installation::.), it will construct the file `Makefile' from the
  736. template file `Makefile.in'.  When it does this, it will incorporate
  737. makefile fragment files from the `config' directory, named `t-TARGET'
  738. and `x-HOST'.  If these files do not exist, it means nothing needs to
  739. be added for a given target or host.
  740.  
  741. * Menu:
  742.  
  743. * Target Fragment:: Writing the `t-TARGET' file.
  744. * Host Fragment::   Writing the `x-HOST' file.
  745.  
  746. 
  747. File: gcc.info,  Node: Target Fragment,  Next: Host Fragment,  Up: Fragments
  748.  
  749. The Target Makefile Fragment
  750. ============================
  751.  
  752.    The target makefile fragment, `t-TARGET', defines special target
  753. dependent variables and targets used in the `Makefile':
  754.  
  755. `LIBGCC1'
  756.      The rule to use to build `libgcc1.a'.  If your target does not
  757.      need to use the functions in `libgcc1.a', set this to empty.
  758.      *Note Interface::.
  759.  
  760. `CROSS_LIBGCC1'
  761.      The rule to use to build `libgcc1.a' when building a cross
  762.      compiler.  If your target does not need to use the functions in
  763.      `libgcc1.a', set this to empty.  *Note Cross Runtime::.
  764.  
  765. `LIBGCC2_CFLAGS'
  766.      Compiler flags to use when compiling `libgcc2.c'.
  767.  
  768. `LIB2FUNCS_EXTRA'
  769.      A list of source file names to be compiled or assembled and
  770.      inserted into `libgcc.a'.
  771.  
  772. `CRTSTUFF_T_CFLAGS'
  773.      Special flags used when compiling `crtstuff.c'.  *Note
  774.      Initialization::.
  775.  
  776. `CRTSTUFF_T_CFLAGS_S'
  777.      Special flags used when compiling `crtstuff.c' for shared linking.
  778.      Used if you use `crtbeginS.o' and `crtendS.o' in `EXTRA-PARTS'.
  779.      *Note Initialization::.
  780.  
  781. `MULTILIB_OPTIONS'
  782.      For some targets, invoking GCC in different ways produces objects
  783.      that can not be linked together.  For example, for some targets GCC
  784.      produces both big and little endian code.  For these targets, you
  785.      must arrange for multiple versions of `libgcc.a' to be compiled,
  786.      one for each set of incompatible options.  When GCC invokes the
  787.      linker, it arranges to link in the right version of `libgcc.a',
  788.      based on the command line options used.
  789.  
  790.      The `MULTILIB_OPTIONS' macro lists the set of options for which
  791.      special versions of `libgcc.a' must be built.  Write options that
  792.      are mutually incompatible side by side, separated by a slash.
  793.      Write options that may be used together separated by a space.  The
  794.      build procedure will build all combinations of compatible options.
  795.  
  796.      For example, if you set `MULTILIB_OPTIONS' to `m68000/m68020
  797.      msoft-float', `Makefile' will build special versions of `libgcc.a'
  798.      using the following sets of options:  `-m68000', `-m68020',
  799.      `-msoft-float', `-m68000 -msoft-float', and `-m68020 -msoft-float'.
  800.  
  801. `MULTILIB_DIRNAMES'
  802.      If `MULTILIB_OPTIONS' is used, this variable specifies the
  803.      directory names that should be used to hold the various libraries.
  804.      Write one element in `MULTILIB_DIRNAMES' for each element in
  805.      `MULTILIB_OPTIONS'.  If `MULTILIB_DIRNAMES' is not used, the
  806.      default value will be `MULTILIB_OPTIONS', with all slashes treated
  807.      as spaces.
  808.  
  809.      For example, if `MULTILIB_OPTIONS' is set to `m68000/m68020
  810.      msoft-float', then the default value of `MULTILIB_DIRNAMES' is
  811.      `m68000 m68020 msoft-float'.  You may specify a different value if
  812.      you desire a different set of directory names.
  813.  
  814. `MULTILIB_MATCHES'
  815.      Sometimes the same option may be written in two different ways.
  816.      If an option is listed in `MULTILIB_OPTIONS', GCC needs to know
  817.      about any synonyms.  In that case, set `MULTILIB_MATCHES' to a
  818.      list of items of the form `option=option' to describe all relevant
  819.      synonyms.  For example, `m68000=mc68000 m68020=mc68020'.
  820.  
  821. `MULTILIB_EXCEPTIONS'
  822.      Sometimes when there are multiple sets of `MULTILIB_OPTIONS' being
  823.      specified, there are combinations that should not be built.  In
  824.      that case, set `MULTILIB_EXCEPTIONS' to be all of the switch
  825.      exceptions in shell case syntax that should not be built.
  826.  
  827.      For example, in the PowerPC embedded ABI support, it was not
  828.      desirable to build libraries that compiled with the
  829.      `-mcall-aixdesc' option and either of the `-mcall-aixdesc' or
  830.      `-mlittle' options at the same time, and therefore
  831.      `MULTILIB_EXCEPTIONS' is set to `*mrelocatable/*mcall-aixdesc*
  832.      *mlittle/*mcall-aixdesc*'.
  833.  
  834. `MULTILIB_EXTRA_OPTS'
  835.      Sometimes it is desirable that when building multiple versions of
  836.      `libgcc.a' certain options should always be passed on to the
  837.      compiler.  In that case, set `MULTILIB_EXTRA_OPTS' to be the list
  838.      of options to be used for all builds.
  839.  
  840. 
  841. File: gcc.info,  Node: Host Fragment,  Prev: Target Fragment,  Up: Fragments
  842.  
  843. The Host Makefile Fragment
  844. ==========================
  845.  
  846.    The host makefile fragment, `x-HOST', defines special host dependent
  847. variables and targets used in the `Makefile':
  848.  
  849. `CC'
  850.      The compiler to use when building the first stage.
  851.  
  852. `CLIB'
  853.      Additional host libraries to link with.
  854.  
  855. `OLDCC'
  856.      The compiler to use when building `libgcc1.a' for a native
  857.      compilation.
  858.  
  859. `OLDAR'
  860.      The version of `ar' to use when building `libgcc1.a' for a native
  861.      compilation.
  862.  
  863. `INSTALL'
  864.      The install program to use.
  865.  
  866. 
  867. File: gcc.info,  Node: Funding,  Next: GNU/Linux,  Prev: Fragments,  Up: Top
  868.  
  869. Funding Free Software
  870. *********************
  871.  
  872.    If you want to have more free software a few years from now, it makes
  873. sense for you to help encourage people to contribute funds for its
  874. development.  The most effective approach known is to encourage
  875. commercial redistributors to donate.
  876.  
  877.    Users of free software systems can boost the pace of development by
  878. encouraging for-a-fee distributors to donate part of their selling price
  879. to free software developers--the Free Software Foundation, and others.
  880.  
  881.    The way to convince distributors to do this is to demand it and
  882. expect it from them.  So when you compare distributors, judge them
  883. partly by how much they give to free software development.  Show
  884. distributors they must compete to be the one who gives the most.
  885.  
  886.    To make this approach work, you must insist on numbers that you can
  887. compare, such as, "We will donate ten dollars to the Frobnitz project
  888. for each disk sold."  Don't be satisfied with a vague promise, such as
  889. "A portion of the profits are donated," since it doesn't give a basis
  890. for comparison.
  891.  
  892.    Even a precise fraction "of the profits from this disk" is not very
  893. meaningful, since creative accounting and unrelated business decisions
  894. can greatly alter what fraction of the sales price counts as profit.
  895. If the price you pay is $50, ten percent of the profit is probably less
  896. than a dollar; it might be a few cents, or nothing at all.
  897.  
  898.    Some redistributors do development work themselves.  This is useful
  899. too; but to keep everyone honest, you need to inquire how much they do,
  900. and what kind.  Some kinds of development make much more long-term
  901. difference than others.  For example, maintaining a separate version of
  902. a program contributes very little; maintaining the standard version of a
  903. program for the whole community contributes much.  Easy new ports
  904. contribute little, since someone else would surely do them; difficult
  905. ports such as adding a new CPU to the GNU Compiler Collection
  906. contribute more; major new features or packages contribute the most.
  907.  
  908.    By establishing the idea that supporting further development is "the
  909. proper thing to do" when distributing free software for a fee, we can
  910. assure a steady flow of resources into making more free software.
  911.  
  912.      Copyright (C) 1994 Free Software Foundation, Inc.
  913.      Verbatim copying and redistribution of this section is permitted
  914.      without royalty; alteration is not permitted.
  915.  
  916. 
  917. File: gcc.info,  Node: GNU/Linux,  Next: Copying,  Prev: Funding,  Up: Top
  918.  
  919. Linux and the GNU Project
  920. *************************
  921.  
  922.    Many computer users run a modified version of the GNU system every
  923. day, without realizing it.  Through a peculiar turn of events, the
  924. version of GNU which is widely used today is more often known as
  925. "Linux", and many users are not aware of the extent of its connection
  926. with the GNU Project.
  927.  
  928.    There really is a Linux; it is a kernel, and these people are using
  929. it.  But you can't use a kernel by itself; a kernel is useful only as
  930. part of a whole system.  The system in which Linux is typically used is
  931. a modified variant of the GNU system--in other words, a Linux-based GNU
  932. system.
  933.  
  934.    Many users are not fully aware of the distinction between the kernel,
  935. which is Linux, and the whole system, which they also call "Linux".
  936. The ambiguous use of the name doesn't promote understanding.
  937.  
  938.    Programmers generally know that Linux is a kernel.  But since they
  939. have generally heard the whole system called "Linux" as well, they
  940. often envisage a history which fits that name.  For example, many
  941. believe that once Linus Torvalds finished writing the kernel, his
  942. friends looked around for other free software, and for no particular
  943. reason most everything necessary to make a Unix-like system was already
  944. available.
  945.  
  946.    What they found was no accident--it was the GNU system.  The
  947. available free software added up to a complete system because the GNU
  948. Project had been working since 1984 to make one.  The GNU Manifesto had
  949. set forth the goal of developing a free Unix-like system, called GNU.
  950. By the time Linux was written, the system was almost finished.
  951.  
  952.    Most free software projects have the goal of developing a particular
  953. program for a particular job.  For example, Linus Torvalds set out to
  954. write a Unix-like kernel (Linux); Donald Knuth set out to write a text
  955. formatter (TeX); Bob Scheifler set out to develop a window system (X
  956. Windows).  It's natural to measure the contribution of this kind of
  957. project by specific programs that came from the project.
  958.  
  959.    If we tried to measure the GNU Project's contribution in this way,
  960. what would we conclude?  One CD-ROM vendor found that in their "Linux
  961. distribution", GNU software was the largest single contingent, around
  962. 28% of the total source code, and this included some of the essential
  963. major components without which there could be no system.  Linux itself
  964. was about 3%.  So if you were going to pick a name for the system based
  965. on who wrote the programs in the system, the most appropriate single
  966. choice would be "GNU".
  967.  
  968.    But we don't think that is the right way to consider the question.
  969. The GNU Project was not, is not, a project to develop specific software
  970. packages.  It was not a project to develop a C compiler, although we
  971. did.  It was not a project to develop a text editor, although we
  972. developed one.  The GNU Project's aim was to develop *a complete free
  973. Unix-like system*.
  974.  
  975.    Many people have made major contributions to the free software in the
  976. system, and they all deserve credit.  But the reason it is *a
  977. system*--and not just a collection of useful programs--is because the
  978. GNU Project set out to make it one.  We wrote the programs that were
  979. needed to make a *complete* free system.  We wrote essential but
  980. unexciting major components, such as the assembler and linker, because
  981. you can't have a system without them.  A complete system needs more
  982. than just programming tools, so we wrote other components as well, such
  983. as the Bourne Again SHell, the PostScript interpreter Ghostscript, and
  984. the GNU C library.
  985.  
  986.    By the early 90s we had put together the whole system aside from the
  987. kernel (and we were also working on a kernel, the GNU Hurd, which runs
  988. on top of Mach).  Developing this kernel has been a lot harder than we
  989. expected, and we are still working on finishing it.
  990.  
  991.    Fortunately, you don't have to wait for it, because Linux is working
  992. now.  When Linus Torvalds wrote Linux, he filled the last major gap.
  993. People could then put Linux together with the GNU system to make a
  994. complete free system: a Linux-based GNU system (or GNU/Linux system,
  995. for short).
  996.  
  997.    Putting them together sounds simple, but it was not a trivial job.
  998. The GNU C library (called glibc for short) needed substantial changes.
  999. Integrating a complete system as a distribution that would work "out of
  1000. the box" was a big job, too.  It required addressing the issue of how
  1001. to install and boot the system--a problem we had not tackled, because
  1002. we hadn't yet reached that point.  The people who developed the various
  1003. system distributions made a substantial contribution.
  1004.  
  1005.    The GNU Project supports GNU/Linux systems as well as *the* GNU
  1006. system--even with funds.  We funded the rewriting of the Linux-related
  1007. extensions to the GNU C library, so that now they are well integrated,
  1008. and the newest GNU/Linux systems use the current library release with
  1009. no changes.  We also funded an early stage of the development of Debian
  1010. GNU/Linux.
  1011.  
  1012.    We use Linux-based GNU systems today for most of our work, and we
  1013. hope you use them too.  But please don't confuse the public by using the
  1014. name "Linux" ambiguously.  Linux is the kernel, one of the essential
  1015. major components of the system.  The system as a whole is more or less
  1016. the GNU system.
  1017.  
  1018.